package com.mls.fivedistrict.pojo;

import com.baomidou.mybatisplus.annotations.TableLogic;
import com.baomidou.mybatisplus.enums.IdType;

import java.util.Date;

import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableName;

import java.io.Serializable;

import com.baomidou.mybatisplus.annotations.Version;

import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.hibernate.validator.constraints.NotBlank;

import javax.validation.constraints.NotNull;

/**
 * <p>
 * 应用程序表
 * </p>
 *
 * @author Five Team
 * @since 2018-05-16
 */
@Data
@Accessors(chain = true)
@TableName("t_application")
public class Application extends Model<Application> {

    private static final long serialVersionUID = 1L;

    /**
     * 第五区应用
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;
    /**
     * 应用名称
     */
    @NotBlank(message = "应用名称不能为空")
    private String name;
    /**
     * 应用打开地址
     */
    @NotBlank(message = "应用打开地址不能为空")
    private String url;
    /**
     * 应用介绍
     */
    private String introduce;
    /**
     * 应用描述
     */
    private String description;
    /**
     * 应用图标
     */
    private String icon;
    private Date createDate;
    private Date updateDate;
    @TableLogic
    private Boolean isDelete;
    private Boolean isEnable;

    public Boolean getEnable() {
        return isEnable;
    }

    public void setEnable(Boolean enable) {
        isEnable = enable;
    }

    public Boolean getDelete() {
        return isDelete;
    }

    public void setDelete(Boolean delete) {
        isDelete = delete;
    }

    /**
     * 应用程序分类ID
     */
    private Long classifyId;


    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
